package main

import (
	"database/sql"
	"gitee.com/lidongyooo/goblog/app/http/middlewares"
	"gitee.com/lidongyooo/goblog/bootstrap"
	"gitee.com/lidongyooo/goblog/pkg/config"
	"github.com/gorilla/mux"
	"net/http"
)

var router *mux.Router
var db *sql.DB

func main() {
	bootstrap.SetupDB()
	router = bootstrap.SetUpRoute()


	http.ListenAndServe(":"+config.GetString("app.port"), middlewares.RemoveTrailingSlash(router))
}
